package com.listeners;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

public class CountListener implements HttpSessionListener {
	private static long onlineNumber = 0;

	public void sessionCreated(HttpSessionEvent arg0) {
		onlineNumber++;

	}

	public void sessionDestroyed(HttpSessionEvent arg0) {
		onlineNumber--;

	}

	public static long getOnlineNumber() {
		return onlineNumber;
	}
}
